<div class="input-group stream-privacy-values">
    <div class="alert stream-privacy-status"></div>
    <h4>{{t 'Who can access the stream?'}}
        {{> ../help_link_widget link="/help/stream-permissions" }}
    </h4>
    {{#each stream_privacy_policy_values}}
        <div class="radio-input-parent">
            <label class="radio">
                <input type="radio" name="privacy" value="{{ this.code }}" {{#if (eq this.code ../stream_privacy_policy) }}checked{{/if}} />
                <b>{{ this.name }}:</b> {{ this.description }}
            </label>
        </div>
    {{/each}}
</div>

<div class="input-group">
    <h4>{{t 'Who can post to the stream?'}}
        {{> ../help_link_widget link="/help/stream-sending-policy" }}
    </h4>
    {{#each stream_post_policy_values}}
        <div class="radio-input-parent">
            <label class="radio">
                <input type="radio" name="stream-post-policy" value="{{ this.code }}" {{#if (eq this.code ../stream_post_policy) }}checked{{/if}} />
                {{ this.description }}
            </label>
        </div>
    {{/each}}
</div>

{{#if (or is_owner is_stream_edit)}}
<div>
    <h4>{{t "Message retention for stream" }}
        {{> ../help_link_widget link="/help/message-retention-policy" }}
    </h4>

    {{> ../settings/upgrade_tip_widget}}

    <div class="input-group inline-block message-retention-setting-group">
        <div class="dropdown-title">{{t "Message retention period" }}
            <i class="fa fa-info-circle settings-info-icon stream_message_retention_tooltip tippy-zulip-tooltip" aria-hidden="true" data-tippy-content="{{t 'Only owners can change stream message retention policy.' }}"></i>
        </div>
        <select name="stream_message_retention_setting"
          class="stream_message_retention_setting" class="prop-element"
          {{#if disable_message_retention_setting}}disabled{{/if}}>
            <option value="realm_default">{{#tr}}Use organization level settings {org_level_message_retention_setting}{{/tr}}</option>
            <option value="unlimited">{{t 'Retain forever' }}</option>
            <option value="retain_for_period">{{t 'Retain for N days after posting' }}</option>
        </select>

        <div class="dependent-inline-block stream-message-retention-days-input">
            <label class="inline-block">
                {{t 'N' }}:
            </label>
            <input type="text" autocomplete="off"
              name="stream-message-retention-days"
              class="stream-message-retention-days"
              value="{{ stream_message_retention_days }}"
              {{#if disable_message_retention_setting}}disabled{{/if}}/>
        </div>
    </div>
</div>
{{/if}}
